\(\int \sec ^2(e+f x) (a+b \sec ^2(e+f x))^2 \, dx\) [173]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 53 \[ \int \sec ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {(a+b)^2 \tan (e+f x)}{f}+\frac {2 b (a+b) \tan ^3(e+f x)}{3 f}+\frac {b^2 \tan ^5(e+f x)}{5 f} \]

[Out]

(a+b)^2*tan(f*x+e)/f+2/3*b*(a+b)*tan(f*x+e)^3/f+1/5*b^2*tan(f*x+e)^5/f

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {4231, 200} \[ \int \sec ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {2 b (a+b) \tan ^3(e+f x)}{3 f}+\frac {(a+b)^2 \tan (e+f x)}{f}+\frac {b^2 \tan ^5(e+f x)}{5 f} \]

[In]

Int[Sec[e + f*x]^2*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

((a + b)^2*Tan[e + f*x])/f + (2*b*(a + b)*Tan[e + f*x]^3)/(3*f) + (b^2*Tan[e + f*x]^5)/(5*f)

Rule 200

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n)^p, x], x] /; FreeQ[{a, b}, x]
&& IGtQ[n, 0] && IGtQ[p, 0]

Rule 4231

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fre
eFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 + ff^2*x^2)^(m/2 - 1)*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/
2), x]^p, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && IntegerQ[n/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \left (a+b+b x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \left (a^2 \left (1+\frac {b (2 a+b)}{a^2}\right )+2 a b \left (1+\frac {b}{a}\right ) x^2+b^2 x^4\right ) \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {(a+b)^2 \tan (e+f x)}{f}+\frac {2 b (a+b) \tan ^3(e+f x)}{3 f}+\frac {b^2 \tan ^5(e+f x)}{5 f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.91 \[ \int \sec ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {15 (a+b)^2 \tan (e+f x)+10 b (a+b) \tan ^3(e+f x)+3 b^2 \tan ^5(e+f x)}{15 f} \]

[In]

Integrate[Sec[e + f*x]^2*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

(15*(a + b)^2*Tan[e + f*x] + 10*b*(a + b)*Tan[e + f*x]^3 + 3*b^2*Tan[e + f*x]^5)/(15*f)

Maple [A] (verified)

Time = 0.62 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.34

method result size
derivativedivides \(\frac {a^{2} \tan \left (f x +e \right )-2 a b \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )-b^{2} \left (-\frac {8}{15}-\frac {\sec \left (f x +e \right )^{4}}{5}-\frac {4 \sec \left (f x +e \right )^{2}}{15}\right ) \tan \left (f x +e \right )}{f}\) \(71\)
default \(\frac {a^{2} \tan \left (f x +e \right )-2 a b \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )-b^{2} \left (-\frac {8}{15}-\frac {\sec \left (f x +e \right )^{4}}{5}-\frac {4 \sec \left (f x +e \right )^{2}}{15}\right ) \tan \left (f x +e \right )}{f}\) \(71\)
parts \(\frac {a^{2} \tan \left (f x +e \right )}{f}-\frac {b^{2} \left (-\frac {8}{15}-\frac {\sec \left (f x +e \right )^{4}}{5}-\frac {4 \sec \left (f x +e \right )^{2}}{15}\right ) \tan \left (f x +e \right )}{f}-\frac {2 a b \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )}{f}\) \(76\)
parallelrisch \(\frac {\left (45 a^{2}+100 a b +40 b^{2}\right ) \sin \left (3 f x +3 e \right )+\left (15 a^{2}+20 a b +8 b^{2}\right ) \sin \left (5 f x +5 e \right )+30 \sin \left (f x +e \right ) \left (a^{2}+\frac {8}{3} a b +\frac {8}{3} b^{2}\right )}{15 f \left (\cos \left (5 f x +5 e \right )+5 \cos \left (3 f x +3 e \right )+10 \cos \left (f x +e \right )\right )}\) \(109\)
risch \(\frac {2 i \left (15 a^{2} {\mathrm e}^{8 i \left (f x +e \right )}+60 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}+60 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+90 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}+140 a b \,{\mathrm e}^{4 i \left (f x +e \right )}+80 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+60 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}+100 a b \,{\mathrm e}^{2 i \left (f x +e \right )}+40 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+15 a^{2}+20 a b +8 b^{2}\right )}{15 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{5}}\) \(158\)
norman \(\frac {-\frac {2 \left (a^{2}+2 a b +b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}-\frac {2 \left (a^{2}+2 a b +b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{f}+\frac {8 \left (3 a^{2}+4 a b +b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3 f}+\frac {8 \left (3 a^{2}+4 a b +b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{3 f}-\frac {4 \left (45 a^{2}+50 a b +29 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{15 f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{5}}\) \(159\)

[In]

int(sec(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/f*(a^2*tan(f*x+e)-2*a*b*(-2/3-1/3*sec(f*x+e)^2)*tan(f*x+e)-b^2*(-8/15-1/5*sec(f*x+e)^4-4/15*sec(f*x+e)^2)*ta
n(f*x+e))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.30 \[ \int \sec ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {{\left ({\left (15 \, a^{2} + 20 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (5 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 3 \, b^{2}\right )} \sin \left (f x + e\right )}{15 \, f \cos \left (f x + e\right )^{5}} \]

[In]

integrate(sec(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

1/15*((15*a^2 + 20*a*b + 8*b^2)*cos(f*x + e)^4 + 2*(5*a*b + 2*b^2)*cos(f*x + e)^2 + 3*b^2)*sin(f*x + e)/(f*cos
(f*x + e)^5)

Sympy [F]

\[ \int \sec ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2} \sec ^{2}{\left (e + f x \right )}\, dx \]

[In]

integrate(sec(f*x+e)**2*(a+b*sec(f*x+e)**2)**2,x)

[Out]

Integral((a + b*sec(e + f*x)**2)**2*sec(e + f*x)**2, x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.34 \[ \int \sec ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {10 \, {\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a b + {\left (3 \, \tan \left (f x + e\right )^{5} + 10 \, \tan \left (f x + e\right )^{3} + 15 \, \tan \left (f x + e\right )\right )} b^{2} + 15 \, a^{2} \tan \left (f x + e\right )}{15 \, f} \]

[In]

integrate(sec(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

1/15*(10*(tan(f*x + e)^3 + 3*tan(f*x + e))*a*b + (3*tan(f*x + e)^5 + 10*tan(f*x + e)^3 + 15*tan(f*x + e))*b^2
+ 15*a^2*tan(f*x + e))/f

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.43 \[ \int \sec ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {3 \, b^{2} \tan \left (f x + e\right )^{5} + 10 \, a b \tan \left (f x + e\right )^{3} + 10 \, b^{2} \tan \left (f x + e\right )^{3} + 15 \, a^{2} \tan \left (f x + e\right ) + 30 \, a b \tan \left (f x + e\right ) + 15 \, b^{2} \tan \left (f x + e\right )}{15 \, f} \]

[In]

integrate(sec(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x, algorithm="giac")

[Out]

1/15*(3*b^2*tan(f*x + e)^5 + 10*a*b*tan(f*x + e)^3 + 10*b^2*tan(f*x + e)^3 + 15*a^2*tan(f*x + e) + 30*a*b*tan(
f*x + e) + 15*b^2*tan(f*x + e))/f

Mupad [B] (verification not implemented)

Time = 18.24 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.83 \[ \int \sec ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {\mathrm {tan}\left (e+f\,x\right )\,{\left (a+b\right )}^2+\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^5}{5}+\frac {2\,b\,{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (a+b\right )}{3}}{f} \]

[In]

int((a + b/cos(e + f*x)^2)^2/cos(e + f*x)^2,x)

[Out]

(tan(e + f*x)*(a + b)^2 + (b^2*tan(e + f*x)^5)/5 + (2*b*tan(e + f*x)^3*(a + b))/3)/f